#include <stdio.h>
#include "arithmetric.h"
#include <string.h>

int main()
{

    operator*ptr_op = NULL;

    char ops[1024] = {0};
    printf("输入计算表达式\n");
    char ch;
    int pos = 0;

    while ((ch = getchar()) != '\n' && ch != EOF)
    {
        ops[pos] = ch;
        pos++;
    }

    init_operator(ops, strlen(ops), &ptr_op);

    int r = get_value(ptr_op);

    printf("%s = %d", ops, r);

    return 0;
}